
<template>
  <div class="content_index">
    <div class="ci_header">
      <div class="ci_left sec-title">
        <el-icon
          style="vertical-align: middle; display: unset; cursor: pointer"
          @click="backList()"
          ><Back
        /></el-icon>
        <!-- <span>{{ route.name }}</span> -->
        <span>DID Document</span>
      </div>
    </div>
    <div class="ci_content" style="margin: 12px 16px">
      <div>
        <pre style="border:1px solid #C0C0C0;margin-bottom: 10px">{{ DetailObj.document }}</pre>
        <div>
          document上链交易ID： {{ DetailObj.txId }}
      </div>
      </div>
    </div>
  </div>
</template>
    <script setup>
import { reactive, ref, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import { DIDInfoApi } from "@/api/DID";
import { ElMessage } from "element-plus";
const router = useRouter();
const route = useRoute();
const backList = () => {
  router.go(-1);
};
const DetailObj = ref({});
const DIDDetailInfo = async () => {
  let id = route.query.id;
  const { success, msg, data } = await DIDInfoApi(id);
  if (success) {
    DetailObj.value = data || {};
  } else {
    ElMessage.error(msg || "明细获取失败,请稍后再试");
  }
};
onMounted(() => {
  DIDDetailInfo();
});
</script>
    
    <style lang="scss" scoped>
@import "../../assets/css/cindex.scss";
:deep .el-upload-list--picture-card .el-upload-list__item-actions span + span {
  margin-left: 0.5em;
}
.add_icon {
  font-size: 18px;
  // margin-left: 10px;
  cursor: pointer;
  height: 100%;
}
.delete_icon {
  font-size: 18px;
  margin-left: 10px;
  cursor: pointer;
  height: 100%;
}
.box {
  display: flex;
  .left_txContent {
    // width: 200px;
    width: 50%;
    padding: 20px;
    // height: 200px;
    // background: pink;
    border-radius: 8px;
    border: 1px solid #d6e9c6;
    word-break: break-word;
    margin-right: 10px;
  }
  .rigth_txContent {
    width: 50%;
    padding: 20px;

    // width: 200px;
    // height: 200px;
    // background: red;
    border-radius: 8px;
    border: 1px solid #d6e9c6;
    word-break: break-word;
  }
}
.file_cn {
  // width: 130px;
  width: 100%;
  font-size: 14px;
  //   text-align: right;
  // margin-left: 70px;
  margin-bottom: 5px;
  padding: 10px;
  border-radius: 4px;
  border: 1px dashed #a6a6a6;
  div {
    margin-bottom: 15px;
  }
}
.Sign_content {
  display: flex;
  font-size: 14px;
  .Sign_content_key {
    display: inline-flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex: 0 0 auto;
    height: 32px;
    line-height: 32px;
    padding: 0 12px 0 0;
    box-sizing: border-box;
    width: 90px;
  }
  .Sign_content_data {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    line-height: 32px;
    position: relative;
    min-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
}

.red {
  color: red;
}
.green {
  color: green;
}
.el-form-item .el-form-item {
  width: 100%;
  margin-bottom: 20px;
}
.wordWrap {
  word-break: break-word;
}
:deep .el-descriptions .el-descriptions__label {
  display: inline-block;
  width: 100px;
  text-align: right;
}
</style>